const LOGIN_INFO = 'LOGIN_INFO'

App({
  onLaunch: function () {
  
    try {
      var userInfo = wx.getStorageSync(LOGIN_INFO)
      if (userInfo) {
        this.globalData.accessToken = userInfo.accessToken ;
      }
    } catch (e) {
    }


    // 登录
    wx.login({
      success: res => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      }
    })
    // 获取用户信息
    
  },
  globalData: {
    userInfo: null,
    accessToken:null
  }
})